import {debounce} from 'common/utils'
import BackTop from "components/content/backTop/BackTop.vue";



export const itemListemer={
    data(){
        return {
            ItemListener:null 
        }
    },
    mounted(){
        let newRefresh=debounce(this.$refs.scroll.refresh,100);
        this.ItemListener=()=>{
          newRefresh()
        }
        this.$bus.$on("imageItemLoad",this.ItemListener)
      },
}
export const backTopMixin={
    data(){
        return {
            isShow:false
        }
    },
    components:{
        BackTop
    },
    methods:{
        backCLick() {
            this.$refs.scroll.scrollTo(0, 0,300);
          },
    },
    listenSHow(position){
        this.isShow = -position.y > 1500 ? true : false;
    }
}